<template>
	<view>
		 <!-- v-for="(item,index) in list" -->
		<view  v-for="(item,index) in list" @click="detail(index)">
			<view style="display: flex;background-color: white;width: 90%;margin-top:20rpx;margin-left: 20rpx;padding: 20rpx;justify-content: space-between;">
				<image style="height: 90rpx;width: 90rpx;border-radius: 50%;flex-shrink: 0" :src="item.avatar" mode="aspectFill"></image>
				<view style="padding-left: 30rpx;width: 100%;">
					<view style="font-weight: bold;">{{item.username}}</view>
					
					<view style="font-size: 20rpx;padding-top: 10rpx;">{{item.des}}</view>
				</view>
				<u-button :disabled="disable" style="width: 140rpx;background-color: antiquewhite;border-radius: 10rpx;">{{content}}</u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(option){
			this.list=JSON.parse(option.list)
			console.log(this.list)
			
			
			
			// this.$H.get('user/'+this.list[).then(res=>{
			// 	console.log(res)
			// 	 this.username=res.data.username
			// 	 this.content=this.content+this.username+"，想和你一起快乐玩耍。"
				
			// })
		},
		data() {
			return {
				list:{},
				avatar: '/static/cat.jpg',
				content: "详情",
				disable: false
				
				
			};
		},
		methods:{
			
			detail(e){
				console.log(e)
				uni.navigateTo({
					url:'/pages/mine/personMainPage/personMainPage?id='+this.list[e].userId+'&myId='+this.list[e].friendId+'&status=1'
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
